package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_shop_purchase table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_shop_purchase"
 */

public abstract class BaseShopPurchase  implements Serializable {

	public static String REF = "ShopPurchase";
	public static String PROP_TIME = "Time";
	public static String PROP_SUPPLIER = "Supplier";
	public static String PROP_TELEPHONE = "Telephone";
	public static String PROP_NUM = "Num";
	public static String PROP_ADDRESS = "Address";
	public static String PROP_PRICE = "Price";
	public static String PROP_LINKMAN = "Linkman";
	public static String PROP_ID = "Id";
	public static String PROP_REMARK = "Remark";
	public static String PROP_SHOPNAME = "Shopname";
	public static String PROP_MERCHANTID = "Merchantid";


	// constructors
	public BaseShopPurchase () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseShopPurchase (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String merchantid;
	private java.lang.String shopname;
	private java.lang.String num;
	private java.lang.String price;
	private java.lang.String remark;
	private java.lang.String linkman;
	private java.lang.String supplier;
	private java.lang.String telephone;
	private java.lang.String address;
	private java.util.Date time;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="Id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: merchantid
	 */
	public java.lang.String getMerchantid () {
		return merchantid;
	}

	/**
	 * Set the value related to the column: merchantid
	 * @param merchantid the merchantid value
	 */
	public void setMerchantid (java.lang.String merchantid) {
		this.merchantid = merchantid;
	}


	/**
	 * Return the value associated with the column: shopname
	 */
	public java.lang.String getShopname () {
		return shopname;
	}

	/**
	 * Set the value related to the column: shopname
	 * @param shopname the shopname value
	 */
	public void setShopname (java.lang.String shopname) {
		this.shopname = shopname;
	}


	/**
	 * Return the value associated with the column: num
	 */
	public java.lang.String getNum () {
		return num;
	}

	/**
	 * Set the value related to the column: num
	 * @param num the num value
	 */
	public void setNum (java.lang.String num) {
		this.num = num;
	}


	/**
	 * Return the value associated with the column: price
	 */
	public java.lang.String getPrice () {
		return price;
	}

	/**
	 * Set the value related to the column: price
	 * @param price the price value
	 */
	public void setPrice (java.lang.String price) {
		this.price = price;
	}


	/**
	 * Return the value associated with the column: remark
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: remark
	 * @param remark the remark value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}


	/**
	 * Return the value associated with the column: linkman
	 */
	public java.lang.String getLinkman () {
		return linkman;
	}

	/**
	 * Set the value related to the column: linkman
	 * @param linkman the linkman value
	 */
	public void setLinkman (java.lang.String linkman) {
		this.linkman = linkman;
	}


	/**
	 * Return the value associated with the column: supplier
	 */
	public java.lang.String getSupplier () {
		return supplier;
	}

	/**
	 * Set the value related to the column: supplier
	 * @param supplier the supplier value
	 */
	public void setSupplier (java.lang.String supplier) {
		this.supplier = supplier;
	}


	/**
	 * Return the value associated with the column: telephone
	 */
	public java.lang.String getTelephone () {
		return telephone;
	}

	/**
	 * Set the value related to the column: telephone
	 * @param telephone the telephone value
	 */
	public void setTelephone (java.lang.String telephone) {
		this.telephone = telephone;
	}


	/**
	 * Return the value associated with the column: address
	 */
	public java.lang.String getAddress () {
		return address;
	}

	/**
	 * Set the value related to the column: address
	 * @param address the address value
	 */
	public void setAddress (java.lang.String address) {
		this.address = address;
	}


	/**
	 * Return the value associated with the column: time
	 */
	public java.util.Date getTime () {
		return time;
	}

	/**
	 * Set the value related to the column: time
	 * @param time the time value
	 */
	public void setTime (java.util.Date time) {
		this.time = time;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.ShopPurchase)) return false;
		else {
			com.jspgou.cms.entity.ShopPurchase shopPurchase = (com.jspgou.cms.entity.ShopPurchase) obj;
			if (null == this.getId() || null == shopPurchase.getId()) return false;
			else return (this.getId().equals(shopPurchase.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}